<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"
      xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity3">

<body>


<div th:if="${#httpServletRequest.remoteUser == null}">
    <a th:href="@{/loginPage}">登录</a>
</div>
<div th:if="${#httpServletRequest.remoteUser != null}">
    <h3 th:inline="text">Hello [[${#httpServletRequest.remoteUser}]]!</h3>
    <form th:action="@{/logout.do}" method="POST">
        <input type="submit" value="退出"/>
    </form>
</div>


<h1 th:text="${message}"></h1>


<br/>
<a th:href="@{/publicPage}">公开</a>
<br/>
<a th:href="@{/securityPage}">私密</a>


<br/>


</body>
</html>